home *** CD-ROM | disk | FTP | other *** search
- /*
- ** A pair of dice on a wooden background.
- ** Jeremy Huxtable 11 Sep 1991
- */
- eyep 0 50 15
- screen 200 200
- light 0.8 point -15 20 15
- light 0.5 point -15 -6 10
-
- surface brown
- ambient .5 .1 .1
- diffuse .8 .39 .05
- specular .18 .29 .05
- specpow 10
-
- surface blue
- ambient .1 .1 .3
- diffuse .3 .7 .8
- specular .3 .4 .7
- specpow 3
- reflect 0.4
-
- surface white
- ambient .02 .02 .02
- diffuse .8 .5 .3
- specular .5 .4 .4
-
- background .3 .3 .7
-
- /* Define a cube with the corners shaved off */
- name cube
- intersect
- box -0.5 -0.5 -0.5 0.5 0.5 0.5
- sphere 0.8 0 0 0
- end
-
- /* A single spot */
- name dieSpot
- sphere 0.1 0 0 0
-
- name spots
- list
- /* The 1 face */
- object dieSpot translate 0 -.5 0
-
- /* The 2 face */
- object dieSpot translate .3 .3 .5
- object dieSpot translate -.3 -.3 .5
-
- /* The 3 face */
- object dieSpot translate .5 0 0
- object dieSpot translate .5 .3 .3
- object dieSpot translate .5 -.3 -.3
- end
-
- /*
- ** A complete die. Note that we subtract the spots from the cube to give indented spots
- ** and that this fortuitously gives us the spot surface in the indentations.
- */
- name dice
- difference
- object blue cube
- object white spots
- end
-
- object dice scale 10 10 10 rotate 0 0 1 120 translate -7 -1 0
- object dice scale 10 10 10 rotate 0 0 1 100 translate 10 2 0
- plane brown 0. 0. -5 0 0 1 texture wood scale 1 1 3
-